Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

253
Vistas
Webpack+Babel | C:\node_modules doesn't exist or is not a directory | JS

hope you doing great.

I just tried using babel and webpack but for some reason it doesn't work. I even bought a new computer but no change...

Every time I start running the webpack command (node_modules/.bin/webpack). I am getting the error: C:\node_modules doesn't exist or is not a directory

The same happens when I using babel without webpack: The "node_modules" command is either misspelled or could not be found. (I am calling a start script from package.json file here - node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js)

The path clearly exsists on my computer. Also I checked several times that I am in the correct folder in my terminal... My package.json file looks like this:

{
      "name": "chapter_19",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "babel": "node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js"
      },
      "author": "",
      "license": "ISC",
      "devDependencies": {
        "@babel/cli": "^7.2.3",
        "@babel/core": "^7.3.4",
        "@babel/preset-env": "^7.3.4"
      },
      "dependencies": {
        "webpack": "^5.72.1",
        "webpack-cli": "^4.9.2"
      }
    }

Here's my webpack file:

  const path = require('path');

module.exports = {
    entry:':/src/index.js',
    output:{
        path: path.resolve(__dirname, 'dist/assets'),
        filename: 'bundle.js'
    }
}

And my files/folders image

Does someome maybe what's going on here?

Help would be greatly greatly appreciated.Thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda